package org.example;

import redis.clients.jedis.Jedis;

/**
 * @Auther: wangbw
 * @Date:2020/9/23
 * @Description: org.example
 * @version: 1.0
 */
public class PfPractice {
    public static void main(String[] args) {
        //连接本地的 Redis 服务
        Jedis jedis = new Jedis();
        jedis.del("codeHole");
        for (int i = 0; i < 100000; i++) {
            jedis.pfadd("codeHole", "user" + i);
        }
        long total = jedis.pfcount("codeHole");
        System.out.println(total);
        jedis.close();
    }
}
